"use strict";

function initialiseAdvancedPanel()
{
	// Hooking into keydowns on the command line text input
	$('#tabContentAdvanced #advanced-commandLine').on("keydown",
		function(e)
		{
			var target = $(e.target);

			if (e.keyCode == 13) // enter key
			{
				// Defocus the text input
				target.blur();
				// Don't propagate, otherwise we will trigger
				// the Play button immediately.
				e.stopPropagation();
			}
		});
	
	return Promise.resolve();
}

// Add our stuff to the startup
startupPostPropertyLoadTasks.push(initialiseAdvancedPanel);
